package com.liu.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class R {
    private int code; //状态码
    private String msg; //消息
    private Object data; //查询的数据
    //成功
    public static R ok(){
        return new R(200,"OK",null);
    }
    //失败
    public static R ok(Object obj){
        return new R(200,"OK",obj);
    }
    public static R fail(){
        return new R(400,"FAIL",null);
    }
}
